package com.longteng.diamond.constant;

import lombok.Data;

/**
 * Created by Administrator
 * DATE : 2018/8/16
 * TIME : 23:57
 * PROJECT : java-lesson
 * PACKAGE : com.longteng.lesson
 *
 * @author <a href="mailto:taki@qq.com">Administrator</a>
 */

public enum TestCaseStatus {
    PASS(1,"通过"), Fail(2,"失败");
    private int value;
    private String name;
    TestCaseStatus(int value, String name) {
        this.value = value;
        this.name = name;
    }
    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }
    public static String getName(int value) {
        for (TestCaseStatus t : TestCaseStatus.values()) {
            if (value == t.getValue()) {
                return t.getName();
            }
        }
        return null;
    }
}
